<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script type="text/javascript">
    var singleText = document.getElementById('singleText');
if (singleText.value === '') {
    singleText.value = '请填写您的信息';
}
if (singleText.value.length < 8) {
    alert('输入内容至少 8 个字符');
}
</script>
</head>

<body>
<table width="577" height="711" border="1" align="center" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td><label for="singleText">单行文本框:</label>
      <input type="text" name="singleText" id="singleText"></td>
      <td><label for="singleText">多行文本框:</label>
      <textarea name="singleText" id="singleText"></textarea></td>
    </tr>
    <tr>
      <td align="center"><input type="submit" name="submit" id="submit" value="提交"></td>
      <td align="center"><input type="reset" name="reset" id="reset" value="重置"></td>
    </tr>
  </tbody>
</table>
</body>
</html>